#include "SystemConfig.h"
#include <iostream>

SystemConfig* SystemConfig::g_instance = new SystemConfig;

SystemConfig::SystemConfig()
	:moldcavity_remote_path_("")
{}

SystemConfig::~SystemConfig() {}

SystemConfig* SystemConfig::getInstance() {
	return g_instance;
}

void SystemConfig::Distroy(void) {
	if (g_instance) {
		delete g_instance;
		g_instance = nullptr;
	}
}

void SystemConfig::SetMoldCavityRemotePath(const std::string& src) {
	std::unique_lock<std::mutex> lck(mt_visit);
	moldcavity_remote_path_ = src;
}

std::string SystemConfig::GetMoldCavityRemotePath(void) {
	std::unique_lock<std::mutex> lck(mt_visit);
	return moldcavity_remote_path_;
}
